﻿/*------------------------------------------------
// File Description: ColorConfig DataBase Entity
// Author:			 Crane
// Create Time:		 2020-07-03 22:24:54
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 颜色配置
    /// </summary>
    [Table(nameof(ColorMatch))]
    public class ColorMatch : BaseEntity
    {
        private string _orderNo = string.Empty;
        private string _cellColorCode = string.Empty;
        private string _cellColor = string.Empty;
        private string _componentColorCode = string.Empty;
        private string _componentColor = string.Empty;
        private string _workOrderNo;

        #region Public Property

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string OrderNo
        {
            get { return string.IsNullOrWhiteSpace(_orderNo) ? string.Empty : _orderNo; }
            set { _orderNo = value; }
        }

        ///<Summary>
        /// 订单号
        ///</Summary>
        public string WorkOrderNo
        {
            get { return string.IsNullOrWhiteSpace(_workOrderNo) ? string.Empty : _workOrderNo; }
            set { _workOrderNo = value; }
        }

        ///<Summary>
        /// 电池片颜色代码
        ///</Summary>
        public string CellColorCode
        {
            get { return string.IsNullOrWhiteSpace(_cellColorCode) ? string.Empty : _cellColorCode; }
            set { _cellColorCode = value; }
        }

        ///<Summary>
        /// 电池片颜色
        ///</Summary>
        public string CellColor
        {
            get { return string.IsNullOrWhiteSpace(_cellColor) ? string.Empty : _cellColor; }
            set { _cellColor = value; }
        }

        ///<Summary>
        /// 组件颜色代码
        ///</Summary>
        public string ComponentColorCode
        {
            get { return string.IsNullOrWhiteSpace(_componentColorCode) ? string.Empty : _componentColorCode; }
            set { _componentColorCode = value; }
        }

        ///<Summary>
        /// 组件颜色
        ///</Summary>
        public string ComponentColor
        {
            get { return string.IsNullOrWhiteSpace(_componentColor) ? string.Empty : _componentColor; }
            set { _componentColor = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 颜色配置
        /// </summary>
        public virtual DbSet<ColorMatch> ColorMatches { get; set; }
    }
}
